﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>parent>child选择器的应用</title>
    <style>
        body{
            font-size:14px;
        }
    </style>
<script src="jquery.min.js">

</script>
</head>
<body>
    <ul class="topnav">
        <li>item 1</li>
        <li>
            item 2
            <ul>
                <li>
                    Nested item 1
                </li>
                <li>
                    Nested item 2
                </li>
                <li>
                    Nested item 3
                </li>
            </ul>
        </li>
        <li>
            item 3
        </li>
    </ul>
    <script>
        $("ul.topnav > li").css("border", "3px double red");
    </script>
</body>
</html>